<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* Start of file providers.php */
/* Location: ./billing_ap/models/providers.php */
class Excels extends CI_Model {
    
	function __construct(){
        parent::__construct(); /** Call the Model constructor */
       	$this->load->model('providers'); /** load table providers **/ 
    }
	
	function index_6($month,$year,$provider){
	    /** Load a Table providers */
        $recordset  =   $this->providers->getDailyLogProvider($month,$year,$provider);
        $objPHPExcel = new PHPExcel();
        /** excel properties */
        $objPHPExcel->getProperties()->setTitle("General Lab")
					->setDescription("description");
					 $objPHPExcel->setActiveSheetIndex(0);
                     $objPHPExcel->getActiveSheet()->setTitle($provider);
        
        /** excel Page Setup */
        $objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(Worksheet_PageSetup::ORIENTATION_PORTRAIT);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(Worksheet_PageSetup::PAPERSIZE_A4);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setTop(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setRight(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setLeft(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setBottom(1);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setScale(100);
        
        /** Style Property **/
        $full_border = array('borders' => array( 'allborders' => array('style'=>Style_Border::BORDER_THIN )));
        $fill        = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'CCCCCC'),'endcolor'=>array('argb' => 'CCCCCC'));
        $sunday      = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'FF3030'),'endcolor'=>array('argb' => 'FF3030'));   
        $saturday    = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'00FFFF'),'endcolor'=>array('argb' => '00FFFF'));
        
        /** page start */
        $row=1; /** row 1*/
        $col=0; /** coloumn 1*/  
        
        /** Title Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Data Penerimaan Gas dari '.$provider); /** Title */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,''); /** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page periode */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/  
        /** Periode Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Periode : '.$month.' '.$year); /** Periode */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page title */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/ 
        /** Title Page */
        
        /** coloumn Tgl */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,lang('date')); /** Tgl */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col)->setWidth(5);
        
        /** coloumn Tekanan */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('pressure'));/** Tekanan */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+1)->setWidth(15);
        
        /** coloumn DP */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('dp'));/** DP */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+2)->setWidth(15);
        
        /** coloumn Suhu */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,lang('suhu'));/** SUHU */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+3)->setWidth(15);
        
        /** coloumn Quota */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('quota'));/** QUOTA */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+4)->setWidth(15);
        
        /** coloumn Quota */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('quota'));/** QUOTA */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+5)->setWidth(15);
        
        /** page title 2 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 2 */
        
         /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn PSI */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('psi'));/** PSI */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn H20 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('h20'));/** DP */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Suhu */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'F');/** SUHU */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MSCFD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('mscfd'));/** MSCFD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MMBTU */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('mmbtu'));/** MMBTU */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        /** page title 3 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 2 */
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 1 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'1');/** 1 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 1 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'1');/** 1 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        
         /** page content  */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Page content */
        foreach($recordset as $rec):
            /** coloumn Day */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,$rec['day']); /** Field Tgl */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($saturday);
                
            /** coloumn Pressure */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,decimal($rec['Pressure'],2)); /** Field Pressure */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($saturday);
                
                
            /** coloumn DiffPressure */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,decimal($rec['DiffPressure'],2)); /** Field DiffPressure */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Temperatur */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,decimal($rec['Temperature'],2)); /** Field DiffPressure */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($saturday);
                
            
            $row=$row+1; /** next counter $row */ 
        endforeach;
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(50);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'PT PERTAMINA GAS');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'PT. BAYU BUANA GEMILANG');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
    
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(20);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'(AGUS MUKOROBIN)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'(MONO ARINTA)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"(BUDIARDJO)");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
    
            
        /** Save it as an excel 2007 file */
        $objWriter = IOFactory::createWriter($objPHPExcel, "Excel2007");
        $file = "Penerimaan-Gas.xls";
        $objWriter->save($file);
        return $file;  
	}
    
    function index_11($month,$year,$provider){
	    /** Load a Table providers */
        $recordset  =   $this->providers->getDailyLogProvider($month,$year,$provider);
        //echo $this->db->last_query();
        $objPHPExcel = new PHPExcel();
        /** excel properties */
        $objPHPExcel->getProperties()->setTitle("General Lab")
					->setDescription("description");
					 $objPHPExcel->setActiveSheetIndex(0);
                     $objPHPExcel->getActiveSheet()->setTitle($provider);
        
        /** excel Page Setup */
        $objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(Worksheet_PageSetup::PAPERSIZE_A4);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setTop(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setRight(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setLeft(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setBottom(1);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setScale(90);
        
        /** Style Property **/
        $full_border = array('borders' => array( 'allborders' => array('style'=>Style_Border::BORDER_THIN )));
        $fill        = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'CCCCCC'),'endcolor'=>array('argb' => 'CCCCCC'));
        $sunday      = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'FF3030'),'endcolor'=>array('argb' => 'FF3030'));   
        $saturday    = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'00FFFF'),'endcolor'=>array('argb' => '00FFFF'));
        
        /** page start */
        $row=1; /** row 1*/
        $col=0; /** coloumn 1*/  
        
        /** Title Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Data Penerimaan Gas dari '.$provider); /** Title */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,''); /** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page periode */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/  
        /** Periode Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Periode : '.$month.' '.$year); /** Periode */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page title */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/ 
        /** Title Page */
        
        /** coloumn Tgl */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,lang('date')); /** Tgl */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col)->setWidth(5);
        
        /** coloumn Flow */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('flow'));/** Tekanan */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+1)->setWidth(15);
        
        /** coloumn DP */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('specific_gravity'));/** DP */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+2)->setWidth(15);
        
        /** Merge Cell column 2 + 3 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
  
        /** coloumn 3 Empty **/
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        
 
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+4)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+5)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+6)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+7)->setWidth(20);
        
        /** coloumn MMBTU */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,lang('mmbtu'));/** MMBTU Field */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+8)->setWidth(15);
        
        /** Merge Cell column 8 + 9 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+8,$row,$col+9,$row);
  
        /** coloumn 9 Empty **/
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        
        /** coloumn MMSCF */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,lang('mmscf'));/** MMSCF Field */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+10)->setWidth(15);
        
        /** page title 2 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 2 */
        
         /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MSCFD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('mscfd'));/** MSCFD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Design */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('design'));/** Design */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Actual */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'Actual');/** Actual */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Corection */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('corection'));/** MSCFD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Volume */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('volume'));/** Volume */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn BTU */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,lang('btu'));/** BTU */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn MMBTUD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,lang('mmbtud'));/** MMBTUD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Odira Bitung */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,lang('odira_bitung'));/** Odira Bitung */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn BBG */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,lang('bbg'));/** BBG */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MMSCF */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,lang('mmscf'));/** MMSCF */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($fill);
        
        /** page title 3 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 2 */
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 1 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'1');/** 1 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 1 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 2 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,'2');/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,'');/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 3 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,'3');/** 3 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,'');/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,'');/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($fill);
        
         /** page content  */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Page content */
        foreach($recordset as $rec):
            /** coloumn Day */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,$rec['day']); /** Field Tgl */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($saturday);
                
            /** coloumn Flowrate */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,decimal($rec['Flowrate'],4)); /** Field Flowrate */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($saturday);
                
                
            /** coloumn SG Design */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,decimal($rec['SG_Design'],4)); /** Field SG_Design */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn SG_Aktual */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,decimal($rec['SG_Aktual'],4)); /** Field SG_Aktual */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Faktor_Koreksi */
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,decimal($rec['Faktor_Koreksi'],4));  
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Volume */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,decimal($rec['Volume'],4));/** Field Volume */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($saturday);
                            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($saturday);
                                                                            
                            
            $row=$row+1; /** next counter $row */ 
        endforeach;
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(50);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'PT PERTAMINA GAS');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'PT. BAYU BUANA GEMILANG');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
    
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(20);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'(AGUS MUKOROBIN)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'(MONO ARINTA)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"(BUDIARDJO)");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
            
        /** Save it as an excel 2007 file */
        $objWriter = IOFactory::createWriter($objPHPExcel, "Excel2007");
        $file = "Penerimaan-Gas.xls";
        $objWriter->save($file);
        return $file;  
	}
    
    function index_13($month,$year,$provider){
	    /** Load a Table providers */
        $recordset  =   $this->providers->getDailyLogProvider($month,$year,$provider);
        //echo $this->db->last_query();
        $objPHPExcel = new PHPExcel();
        /** excel properties */
        $objPHPExcel->getProperties()->setTitle("General Lab")
					->setDescription("description");
					 $objPHPExcel->setActiveSheetIndex(0);
                     $objPHPExcel->getActiveSheet()->setTitle($provider);
        
        /** excel Page Setup */
        $objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(Worksheet_PageSetup::PAPERSIZE_A4);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setTop(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setRight(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setLeft(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setBottom(1);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setScale(65);
        
        /** Style Property **/
        $full_border = array('borders' => array( 'allborders' => array('style'=>Style_Border::BORDER_THIN )));
        $fill        = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'CCCCCC'),'endcolor'=>array('argb' => 'CCCCCC'));
        $sunday      = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'FF3030'),'endcolor'=>array('argb' => 'FF3030'));   
        $saturday    = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'00FFFF'),'endcolor'=>array('argb' => '00FFFF'));
        
        /** page start */
        $row=1; /** row 1*/
        $col=0; /** coloumn 1*/  
        
        /** Title Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Data Penerimaan Gas dari '.$provider); /** Title */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,''); /** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page periode */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/  
        /** Periode Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Periode : '.$month.' '.$year); /** Periode */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page title */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/ 
        /** Title Page */
        
        /** coloumn Tgl */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,lang('date')); /** Tgl */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col)->setWidth(5);
        
        /** coloumn Pressure */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('pressure'));/** Tekanan */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+1)->setWidth(15);
        
        /** coloumn DP */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('dp'));/** DP */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+2)->setWidth(15);
        
        /** coloumn Suhu */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,lang('suhu'));/** Suhu */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+2)->setWidth(15);
        
        /** coloumn Suhu */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('flow'));/** Suhu */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+4)->setWidth(15);
 
        /** coloumn specific_gravity */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('specific_gravity'));/** specific_gravity */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+5)->setWidth(15);
        
        /** Merge Cell column 3 + 4 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
  
        /** coloumn 4 Empty **/
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+7)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+8)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,lang('realitation'));/** Realitation */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+9)->setWidth(20);
        
        /** Merge Cell column 9 + 10 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+9,$row,$col+10,$row);
  
        /** coloumn 10 Empty **/
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        
        
        /** coloumn MMBTU */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+11,$row,'');/**  Empty Field */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+11)->setWidth(15);
        
        /** coloumn Total */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+12,$row,lang('total'));/** Total */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+12)->setWidth(20);
        
        /** coloumn realitation */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+13,$row,lang('realitation'));/** realitation Field */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+13)->setWidth(15);
        
        /** Merge Cell column 13 + 14 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+13,$row,$col+14,$row);
  
        /** coloumn 14 Empty **/
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+14,$row)->applyFromArray($full_border);
        
        /** page title 3 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 3 */
        
         /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MSCFD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('psi'));/** MSCFD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Design */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('h20'));/** Design */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Actual */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'F');/** F */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MSCFD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('mscfd'));/** MSCFD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Design */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('design'));/** Design */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Actual */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,lang('actual'));/** BTU */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn MMBTUD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,lang('corection'));/** MMBTUD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Odira Bitung */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,lang('volume'));/** Odira Bitung */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn BBG */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,lang('pertagas'));/** BBG */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn BBG */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,lang('bbg'));/** MMSCF */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn BTU */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+11,$row,lang('btu'));/** MMSCF */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Pertagas */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+12,$row,lang('pertagas'));/** MMSCF */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Pertagas */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+13,$row,lang('pertagas'));/** MMSCF */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Pertagas */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+14,$row,lang('bbg'));/** MMSCF */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+14,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+14,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+14,$row)->getFill()->applyFromArray($fill);
        
        /** page title 3 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 2 */
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Total */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('total'));/** Total */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 1 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 2 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,'2');/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,'');/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 3 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,lang('mscfd'));/** 3 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,lang('mscfd'));/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        
        /** Merge Cell column 9 + 10 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+9,$row,$col+10,$row);
  
        /** coloumn 10 Empty **/
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+11,$row,'');/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn MMBTUD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+12,$row,lang('mmbtud'));/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+13,$row,lang('mmbtud'));/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getFill()->applyFromArray($fill);
        
        /** Merge Cell column 9 + 10 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+13,$row,$col+14,$row);
  
        /** coloumn 13 Empty **/
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+14,$row)->applyFromArray($full_border);
        
         /** page content  */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Page content */
        foreach($recordset as $rec):
            /** coloumn Day */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,$rec['day']); /** Field Tgl */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($saturday);
                
            /** coloumn Pressure */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,decimal($rec['Pressure'],2)); /** Field Flowrate */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($saturday);
                
                
            /** coloumn $rec['DiffPressure'] */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,decimal($rec['DiffPressure'],2)); /** Field SG_Design */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Temperature */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,decimal($rec['Temperature'],2)); /** Field SG_Aktual */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Flowrate */
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,decimal($rec['Flowrate'],4));  
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Volume */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,decimal($rec['Volume'],4));/** Field Volume */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn SG_Design */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,decimal($rec['SG_Design'],4));/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn SG_Aktual */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,decimal($rec['SG_Aktual'],4));/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($saturday);
                            
            /** coloumn Faktor_Koreksi */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,decimal($rec['Faktor_Koreksi'],4));/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Volume */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,decimal($rec['Volume'],4));/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($saturday);
                                                                            
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+11,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getFill()->applyFromArray($saturday);
                                                                            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+12,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+13,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getFill()->applyFromArray($saturday);
                                                                                                       
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+14,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+14,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+14,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+14,$row)->getFill()->applyFromArray($saturday);
                                                                             
            $row=$row+1; /** next counter $row */ 
        endforeach;
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(50);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'PT PERTAMINA GAS');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'PT. BAYU BUANA GEMILANG');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
    
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(20);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'(AGUS MUKOROBIN)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'(MONO ARINTA)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"(BUDIARDJO)");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
            
        /** Save it as an excel 2007 file */
        $objWriter = IOFactory::createWriter($objPHPExcel, "Excel2007");
        $file = "Penerimaan-Gas.xls";
        $objWriter->save($file);
        return $file;  
	}
    
    function recap_distribution($month,$year,$provider){
	    /** Load a Table providers */
        $recordset  =   $this->providers->getDailyLogProvider($month,$year,$provider);
        $objPHPExcel = new PHPExcel(); /** init a new phpExcell **/
        /** excel properties */
        $objPHPExcel->getProperties()->setTitle("Rekap-Gas")
					->setDescription("description");
					 $objPHPExcel->setActiveSheetIndex(0);
                     $objPHPExcel->getActiveSheet()->setTitle($provider);
        
        /** excel Page Setup */
        $objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(Worksheet_PageSetup::ORIENTATION_PORTRAIT);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(Worksheet_PageSetup::PAPERSIZE_A4);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setTop(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setRight(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setLeft(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setBottom(1);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setScale(100);
        
        /** Style Property **/
        $full_border = array('borders' => array( 'allborders' => array('style'=>Style_Border::BORDER_THIN )));
        $fill        = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'CCCCCC'),'endcolor'=>array('argb' => 'CCCCCC'));
        $sunday      = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'FF3030'),'endcolor'=>array('argb' => 'FF3030'));   
        $saturday    = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'00FFFF'),'endcolor'=>array('argb' => '00FFFF'));
        
        /** page start */
        $row=1; /** row 1*/
        $col=0; /** coloumn 1*/  
        
        /** Title Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Rekap Data Penerimaan Gas dari '.$provider); /** Title */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,''); /** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page periode */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/  
        /** Periode Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Periode : '.$month.' '.$year); /** Periode */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page title */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/ 
        /** Title Page */
        
        /** coloumn Tgl */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,lang('date')); /** Tgl */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col)->setWidth(5);
        
        /** coloumn Tekanan */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('press').' '.lang('psig'));/** Press PSIG */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+1)->setWidth(15);
        
        /** coloumn DP */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('temp').' '. ' F');/** DP */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+2)->setWidth(15);
        
        /** coloumn Suhu */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,lang('energi').' '.lang('mmbtu'));/** Energy MMBTU */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+3)->setWidth(15);
        
        /** coloumn Quota */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('comulatif'));/** Comulatif */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+4)->setWidth(15);
        
        /** coloumn Quota */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('information'));/** Information */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+5)->setWidth(15);
        
         /** page content  */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Page content */
        $jml_kumulatif = 0; /** counter 0 to komulatif **/
        foreach($recordset as $rec):
            $jml_kumulatif = $jml_kumulatif + $rec['GHV']; /** jml komulatif **/
            /** coloumn Day */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,$rec['day']); /** Field Tgl */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($saturday);
                
            /** coloumn Pressure */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,$rec['Pressure']); /** Field Pressure */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($saturday);
                
                
            /** coloumn Temperature */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,$rec['Temperature']); /** Field DiffPressure */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn GHV */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,decimal($rec['GHV'],4)); /** Field DiffPressure */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn jml_kumulatif */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,decimal($jml_kumulatif,4));/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($saturday);
                
            
            $row=$row+1; /** next counter $row */ 
        endforeach;
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(50);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'PT. BAYU BUANA GEMILANG');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
    
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(20);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'(H.Achmad)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'(Undang Syarifudin)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
    
            
        /** Save it as an excel 2007 file */
        $objWriter = IOFactory::createWriter($objPHPExcel, "Excel2007");
        $file = "Rekap-Gas.xls";
        $objWriter->save($file);
        return $file;  
	}
    
    function reception($month,$year,$provider){
	    /** Load a Table providers */
        $recordset  =   $this->providers->getDailyLogProvider($month,$year,$provider);
        //echo $this->db->last_query();
        $objPHPExcel = new PHPExcel();
        /** excel properties */
        $objPHPExcel->getProperties()->setTitle("General Lab")
					->setDescription("description");
					 $objPHPExcel->setActiveSheetIndex(0);
                     $objPHPExcel->getActiveSheet()->setTitle($provider);
        
        /** excel Page Setup */
        $objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(Worksheet_PageSetup::PAPERSIZE_A4);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setTop(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setRight(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setLeft(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setBottom(1);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setScale(65);
        
        /** Style Property **/
        $full_border = array('borders' => array( 'allborders' => array('style'=>Style_Border::BORDER_THIN )));
        $fill        = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'CCCCCC'),'endcolor'=>array('argb' => 'CCCCCC'));
        $sunday      = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'FF3030'),'endcolor'=>array('argb' => 'FF3030'));   
        $saturday    = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'00FFFF'),'endcolor'=>array('argb' => '00FFFF'));
        
        /** page start */
        $row=1; /** row 1*/
        $col=0; /** coloumn 1*/  
        
        /** Title Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Data Penerimaan Gas dari '.$provider); /** Title */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,''); /** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page periode */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/  
        /** Periode Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Periode : '.$month.' '.$year); /** Periode */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page title */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/ 
        /** Title Page */
        
        /** coloumn Tgl */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,lang('date')); /** Tgl */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col)->setWidth(5);
        
        /** coloumn Pressure */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('pressure'));/** Tekanan */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+1)->setWidth(15);
        
        /** coloumn DP */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('dp'));/** DP */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+2)->setWidth(15);
        
        /** coloumn Suhu */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,lang('suhu'));/** Suhu */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+2)->setWidth(15);
        
        /** coloumn Suhu */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('flow'));/** Suhu */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+4)->setWidth(15);
 
        /** coloumn specific_gravity */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('specific_gravity'));/** specific_gravity */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+5)->setWidth(15);
        
        /** Merge Cell column 3 + 4 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
  
        /** coloumn 4 Empty **/
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+7)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+8)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+9)->setWidth(20);
        
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,'');/**  Empty Field */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+10)->setWidth(15);
        
        /** page title 3 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 3 */
        
         /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MSCFD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('psi'));/** MSCFD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Design */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('h20'));/** Design */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Actual */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'F');/** F */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MSCFD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('mscfd'));/** MSCFD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Design */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('design'));/** Design */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Actual */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,lang('actual'));/** BTU */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn MMBTUD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,lang('corection'));/** MMBTUD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Odira Bitung */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,lang('volume'));/** Odira Bitung */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn BTU */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,lang('btu'));/** BTU */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn @1000 BTU/SCF */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,'@1000 BTU/SCF');/** @1000 BTU/SCF */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($fill);
        
        /** page title 3 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 2 */
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Total */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'1');/** Total */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 1 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'2');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 2 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,'3');/** 3 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,'4');/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 3 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,'5');/** 5 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,'6');/** 5 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,'');/** 6 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($fill);
        
       
         /** page content  */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Page content */
        foreach($recordset as $rec):
            /** coloumn Day */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,$rec['day']); /** Field Tgl */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($saturday);
                
            /** coloumn Pressure */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,decimal($row['Pressure'],4)); /** Field Flowrate */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($saturday);
                
                
            /** coloumn $rec['DiffPressure'] */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,decimal($row['DiffPressure'],4)); /** Field SG_Design */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Temperature */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,decimal($row['Temperature'],4)); /** Field SG_Aktual */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Flowrate */
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,decimal($rec['Flowrate'],4));  
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Volume */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,decimal($rec['SG_Design'],4));/** Field Volume */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn SG_Design */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,decimal($rec['SG_Aktual'],4));/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn SG_Aktual */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,decimal($rec['Faktor_Koreksi'],4));/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($saturday);
                            
            /** coloumn Faktor_Koreksi */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,decimal($rec['Volume'],4));/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Volume */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,decimal($rec['GHV'],4));/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,decimal($rec['Energi'],4));/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($saturday);
                                       
            $row=$row+1; /** next counter $row */ 
        endforeach;
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(50);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'PT PERTAMINA GAS');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'PT. BAYU BUANA GEMILANG');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
    
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(20);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'(AGUS MUKOROBIN)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'(MONO ARINTA)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"(BUDIARDJO)");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
            
        /** Save it as an excel 2007 file */
        $objWriter = IOFactory::createWriter($objPHPExcel, "Excel2007");
        $file = "Penerimaan-Gas.xls";
        $objWriter->save($file);
        return $file;  
	}
    
    
    function reception_02($month,$year,$provider){
	    /** Load a Table providers */
        $recordset  =   $this->providers->getDailyLogProvider($month,$year,$provider);
        //echo $this->db->last_query();
        $objPHPExcel = new PHPExcel();
        /** excel properties */
        $objPHPExcel->getProperties()->setTitle("General Lab")
					->setDescription("description");
					 $objPHPExcel->setActiveSheetIndex(0);
                     $objPHPExcel->getActiveSheet()->setTitle($provider);
        
        /** excel Page Setup */
        $objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(Worksheet_PageSetup::PAPERSIZE_A4);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setTop(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setRight(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setLeft(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setBottom(1);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setScale(65);
        
        /** Style Property **/
        $full_border = array('borders' => array( 'allborders' => array('style'=>Style_Border::BORDER_THIN )));
        $fill        = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'CCCCCC'),'endcolor'=>array('argb' => 'CCCCCC'));
        $sunday      = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'FF3030'),'endcolor'=>array('argb' => 'FF3030'));   
        $saturday    = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'00FFFF'),'endcolor'=>array('argb' => '00FFFF'));
        
        /** page start */
        $row=1; /** row 1*/
        $col=0; /** coloumn 1*/  
        
        /** Title Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Data Penerimaan Gas dari '.$provider); /** Title */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,''); /** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page periode */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/  
        /** Periode Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Periode : '.$month.' '.$year); /** Periode */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page title */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/ 
        /** Title Page */
        
        /** coloumn Tgl */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,lang('date')); /** Tgl */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col)->setWidth(5);
        
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+1,$row,$col+10,$row);
         
        /** Merge Cell column 1 + 10 **/  
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'-'); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
  
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Gas yang diserahkan */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+11,$row,'Gas yang diserahkan');/** Tekanan */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getFill()->applyFromArray($fill);
        
        /** Merge Cell column 1 + 10 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+11,$row,$col+13,$row);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+12,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getFill()->applyFromArray($fill);
        
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+13,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getFill()->applyFromArray($fill);
        
           
        /** page title 3 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 3 */
        
         /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MSCFD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('flow'));/** MSCFD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Design */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('specific_gravity'));/** Design */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
        /** Merge Cell column 1 + 10 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,''); /** Empty */
        
         /** coloumn Actual */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** F */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MMSCF */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('mmscf'));/** MSCFD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        /** Merge Cell column 5 + 10 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+9,$row);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        
         /** Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn REALISASI PEP */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+11,$row,'REALISASI PEP');/** BTU */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn REALISASI BBG */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+12,$row,'REALISASI BBG');/** MMBTUD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn MINGGUAN */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+13,$row,'MINGGUAN');/** Odira Bitung */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getFill()->applyFromArray($fill);
        
        /** page title 3 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 2 */
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'('.lang('mscfd').')');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+1)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('design'));/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+2)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,lang('actual'));/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+3)->setWidth(15);
        
        /** coloumn Total */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('corection'));/** Total */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+4)->setWidth(15);
        
        /** coloumn 1 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('volume'));/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+5)->setWidth(15);
        
        /** coloumn 2 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,'Nom EP');/** 3 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+6)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,lang('nominasi'));/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+7)->setWidth(15);
        
        /** coloumn 3 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,lang('realitation'));/** 5 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+8)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,lang('realitation'));/** 5 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+9)->setWidth(15);
        
        
        /** coloumn @1000 BTU/SCF */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,'@1000 BTU/SCF');/** 6 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn @1000 BTU/SCF */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+11,$row,'@1000 BTU/SCF');/** 6 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+11)->setWidth(15);
        
        /** coloumn mmscf */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+12,$row,lang('mmscf'));/** 6 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+12)->setWidth(15);
        
        /** coloumn @1000 BTU/SCF */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+13,$row,'@1000 BTU/SCF');/** 6 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+13)->setWidth(15);
        
        /** page title 3 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 2 */
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 2 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'2');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn 3 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'3');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+3)->setWidth(15);
        
        /** coloumn 4 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'4');/** Total */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+4)->setWidth(15);
        
        /** coloumn 5 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'5=1x4');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+5)->setWidth(15);
        
        /** coloumn 2 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,'');/** 3 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+6)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,lang('bbg'));/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+7)->setWidth(15);
        
        /** coloumn 3 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,lang('bbg'));/** 5 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+8)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,lang('ep'));/** 5 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+9)->setWidth(15);
        
        
        /** coloumn @1000 BTU/SCF */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,'6');/** 6 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn @1000 BTU/SCF */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+11,$row,'7=5x6');/** 6 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+11)->setWidth(15);
        
        /** coloumn mmscf */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+12,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+12)->setWidth(15);
        
        /** coloumn @1000 BTU/SCF */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+13,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+13)->setWidth(15);
        
        
         /** page content  */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Page content */
        foreach($recordset as $rec):
            /** coloumn Day */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,$rec['day']); /** Field Tgl */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($saturday);
                
            /** coloumn Pressure */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,decimal($row['Flowrate'],4)); /** Field Flowrate */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($saturday);
                
                
            /** coloumn $rec['DiffPressure'] */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,decimal($row['SG_Design'],4)); /** Field SG_Design */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Temperature */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,decimal($row['SG_Aktual'],4)); /** Field SG_Aktual */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Flowrate */
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,decimal($rec['Faktor_Koreksi'],4));  
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Volume */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,decimal($rec['Volume'],4));/** Field Volume */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn SG_Design */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn SG_Aktual */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($saturday);
                            
            /** coloumn Faktor_Koreksi */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+8,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+8,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Volume */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+9,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+9,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+10,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+10,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+11,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+11,$row)->getFill()->applyFromArray($saturday);
                                       
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+12,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+12,$row)->getFill()->applyFromArray($saturday);
                                       
            /** coloumn Empty */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+13,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+13,$row)->getFill()->applyFromArray($saturday);
                                                                                                                        
            $row=$row+1; /** next counter $row */ 
        endforeach;
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(50);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'PT PERTAMINA GAS');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'PT. BAYU BUANA GEMILANG');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
    
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(20);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'(AGUS MUKOROBIN)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'(MONO ARINTA)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"(BUDIARDJO)");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
            
        /** Save it as an excel 2007 file */
        $objWriter = IOFactory::createWriter($objPHPExcel, "Excel2007");
        $file = "Penerimaan-Gas.xls";
        $objWriter->save($file);
        return $file;  
	}
    
    function reception_03($month,$year,$provider){
	    /** Load a Table providers */
        $recordset  =   $this->providers->getDailyLogProvider($month,$year,$provider);
        $objPHPExcel = new PHPExcel();
        /** excel properties */
        $objPHPExcel->getProperties()->setTitle("General Lab")
					->setDescription("description");
					 $objPHPExcel->setActiveSheetIndex(0);
                     $objPHPExcel->getActiveSheet()->setTitle($provider);
        
        /** excel Page Setup */
        $objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(Worksheet_PageSetup::PAPERSIZE_A4);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setTop(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setRight(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setLeft(0.75);
        $objPHPExcel->getActiveSheet()->getPageMargins()->setBottom(1);
        $objPHPExcel->getActiveSheet()->getPageSetup()->setScale(65);
        
        /** Style Property **/
        $full_border = array('borders' => array( 'allborders' => array('style'=>Style_Border::BORDER_THIN )));
        $fill        = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'CCCCCC'),'endcolor'=>array('argb' => 'CCCCCC'));
        $sunday      = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'FF3030'),'endcolor'=>array('argb' => 'FF3030'));   
        $saturday    = array('type'       => Style_Fill::FILL_SOLID,'rotation'=>0,'startcolor'=>array('rgb'=>'00FFFF'),'endcolor'=>array('argb' => '00FFFF'));
        
        /** page start */
        $row=1; /** row 1*/
        $col=0; /** coloumn 1*/  
        
        /** Title Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Data Penerimaan Gas dari '.$provider); /** Title */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,''); /** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page periode */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/  
        /** Periode Page */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'Periode : '.$month.' '.$year); /** Periode */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');/** Empty */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,'');/** Empty */
        
         /** page title */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/ 
        /** Title Page */
        
        /** coloumn Tgl */
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,lang('date')); /** Tgl */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col)->setWidth(5);
        
        //$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+1,$row,$col+10,$row);
         
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('nominasi')); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
  
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('analysis')); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
        /** Merge cell 2 to 4 **/
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+4,$row);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('realitation')); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        /** Merge cell 5 to 7 **/
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+7,$row);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        
        
           
        /** page title 3 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 3 */
        
         /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MSCFD */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,lang('mmbtu'));/** MSCFD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn Design */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('sg'));/** Design */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        
        /** Merge Cell column 1 + 10 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,''); /** Empty */
        
         /** coloumn Actual */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('ghv'));/** GHV */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        
         /** coloumn MMSCF */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('volume'));/** MSCFD */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,'Total Mingguan'); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        
        /** Merge Cell column 6 + 7 **/  
        $objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+6,$row,$col+7,$row);
        
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
  
        /** page title 3 */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Title Page 2 */
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,''); /** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($fill);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+1)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,lang('design'));/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+2)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,lang('actual'));/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+3)->setWidth(15);
        
        /** coloumn Total */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,lang('btu'));/** Total */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+4)->setWidth(15);
        
        /** coloumn 1 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,lang('mmscf'));/** Empty */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+5)->setWidth(15);
        
        /** coloumn 2 */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,lang('mmbtu'));/** 3 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+6)->setWidth(15);
        
        /** coloumn Empty */ 
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,lang('mmscf'));/** 2 */
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($fill);
        $objPHPExcel->getActiveSheet()->getColumnDimensionByColumn($col+7)->setWidth(15);
        
         /** page content  */
        $row=$row+1; /** row +1*/
        $col=0; /** coloumn 1*/
        /** Page content */
        foreach($recordset as $rec):
            /** coloumn Day */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,$rec['day']); /** Field Tgl */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getFill()->applyFromArray($saturday);
                
            /** coloumn Pressure */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,''); /** Field Flowrate */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+1,$row)->getFill()->applyFromArray($saturday);
                
                
            /** coloumn $rec['DiffPressure'] */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,decimal($row['SG_Design'],4)); /** Field SG_Design */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Temperature */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,decimal($row['SG_Aktual'],4)); /** Field SG_Aktual */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+3,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Flowrate */
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,decimal($rec['GHV'],4));  
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+4,$row)->getFill()->applyFromArray($saturday);
                
            
            /** coloumn Volume */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,decimal($rec['Volume'],4));/** Field Volume */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn SG_Design */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+6,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+6,$row)->getFill()->applyFromArray($saturday);
            
            /** coloumn SG_Aktual */ 
            $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+7,$row,'');/** Field Empty */
            $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->applyFromArray($full_border);
            if($rec['day_name']=='Sunday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($sunday);
            elseif($rec['day_name']=='Saturday')
                $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+7,$row)->getFill()->applyFromArray($saturday);
                            
                                                                                          
            $row=$row+1; /** next counter $row */ 
        endforeach;
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(50);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'PT PERTAMINA GAS');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'PT. BAYU BUANA GEMILANG');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
    
        $row    =   $row + 1; /** Counter of Row + 1 **/ 
        
        /** Height Of Row **/
        $objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(20);
        
        /** PT Pertamina Aproved **/
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col,$row,'(AGUS MUKOROBIN)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+1,$row,'');
		
        /** PT Bayu Buana Gemilang **/	
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+2,$row,'(MONO ARINTA)');
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+2,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_CENTER);
        
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+3,$row,'');
		
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+2,$row,$col+3,$row);
		
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+4,$row,'');
        
        /**Empty **/	
		$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col+5,$row,"(BUDIARDJO)");
		$objPHPExcel->getActiveSheet()->mergeCellsByColumnAndRow($col+5,$row,$col+6,$row);
        $objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setVertical(Style_Alignment::VERTICAL_TOP);
		$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($col+5,$row)->getAlignment()->setHorizontal(Style_Alignment::HORIZONTAL_LEFT);
            
        /** Save it as an excel 2007 file */
        $objWriter = IOFactory::createWriter($objPHPExcel, "Excel2007");
        $file = "Penerimaan-Gas.xls";
        $objWriter->save($file);
        return $file;  
	}
    
}    